#pragma once

#include <memory>
#include <string>
#include <vector>

#include "abstract_expression.h"
#include "logical_type.hpp"

namespace DaseX {

class ConstantValueExpression : public AbstractExpression {
public:
  explicit ConstantValueExpression(const int &val)
      : AbstractExpression({}, LogicalType::INTEGER), val_(val) {}

  auto Evaluate(const arrow::RecordBatch *tuple,
                const arrow::Schema &schema) const -> int override {
    return val_;
  }

  auto EvaluateJoin(const arrow::RecordBatch *left_tuple,
                    const arrow::Schema &left_schema,
                    const arrow::RecordBatch *right_tuple,
                    const arrow::Schema &right_schema) const -> int override {
    return val_;
  }

  EXPR_CLONE_WITH_CHILDREN(ConstantValueExpression);

  int val_;
};
} // namespace DaseX
